using Toast.Core;
using Toast.Core.Interfaces;
using Yahoo.Yui.Compressor;

namespace Toast.Compression
{
    public class YUIJavascriptCompression : IJavaScriptCompressionStrategy
    {
        #region IJavaScriptCompressionStrategy Members

        public string Compress(string script)
        {
            var packer = new JavaScriptCompressor(script);

            //TODO: Implement YUI compressor options handling
            return packer.Compress(false, false, false, 0);
        }

        public CompressionLevel CompressionLevel { get; set; }

        #endregion
    }

    public class YUICssCompression : ICssCompressionStrategy
    {
        public string Compress(string content)
        {

            //TODO: Implement YUI compressor options handling)
            return CssCompressor.Compress(content);
        }

        public CompressionLevel CompressionLevel { get; set; }
    }
}